package com.study.servlet.servletcontext.dispatcher;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
* @Name: ServletForwardTarget
* @Description: 使用ServletContext实现请求转发目的地
* @Author: 李超	lc_jack@foxmail.com
* @CreateDate: 2017-3-1 上午9:12:17 
* @Version: V1.0
 */
public class ServletForwardTarget extends HttpServlet {

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		PrintWriter out = response.getWriter() ;
		out.write("servlet dispatcher forward target , forward successful ! ") ;
		out.close() ;
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		this.doGet(request, response);
	}

}
